$(function(){

	// On Check Actions
	$(".mail-checker input").on('click',function(e){
		var $tr = $(this).parents('tr:first');
		// Display Message Actions
		$tr.toggleClass('selected');
		// Check that there is a least one message selected to display the message actions toolbar
		var nbSelectedMessages = $("#contentCol tr.selected").length;
		if(nbSelectedMessages <= 0 ) {
			nbSelectedMessages = 0;
			$('#checked-message-only').hide();
			// Hide Bar
		} else {
			$('#webmail-toolbar').data('selected',nbSelectedMessages);
			$('#checked-message-only').show();
		}
	});
});